<?php namespace Cms\Controller;

use Cms\Controller\AuthController;

/**
 * 更新缓存
 * @author hdxj <2300071698@qq.com>
 */
class CacheController extends AuthController
{
    public function index()
    {
        if (IS_POST)
        {
            M("Cms\Model\Config")->updateCache();
            M("Cms\Model\Model")->updateCache();
            // M("Cms\Model\Field")->updateCache();
            // M('Cms\Model\Category')->updateCache();

            $this->success('更新完毕', U('index'));
        }
        else
        {
            $this->display();
        }
    }

}
